home *** CD-ROM | disk | FTP | other *** search
/ Guide To Cracking 2002 / Guide_to_Cracking_2002.iso / Tutorials / Nag and Time Trial / nag / ns51.txt < prev    next >
Encoding:
Text File  |  2000-10-21  |  5.7 KB  |  107 lines

  1. HOW TO CRACK ULEAD PHOTO IMPACT 5 30-DAY TRIAL!
  2.  
  3. Tutorial by UmE
  4.  
  5. Introduction: in this tutorial I'll show you how to remove the time limit from Ulead Photo 
  6. Impact 5 Trial. As you know in time limit cracking you search for a comparison with the 1Eh
  7. value (30 in decimal). In this program the authors have tried to complicate a little bit the
  8. target demanding the time limit check to few calls evryone of which return 1 or 0 depending if
  9. the trial period is ok or is over. The scheme is very simple:
  10.  
  11.                         push [argoment]
  12.                         push [argoment]
  13.                             ....
  14.                         call [address]
  15.                             ....
  16.                         test eax, eax
  17.                         jz [address]
  18.  
  19. It's a typical scheme often used also in serial protected programs. In 99,99% of the cases if
  20. the return value of the call is 1 (eax=1) so you're OK otherwise something is wrong!
  21.  
  22. Necessary tools: SoftIce 3.24 or better.
  23.  
  24. Program description: Ulead Photo Impact 5 Trial, Iedit.exe, 3.166.208 bytes.
  25.  
  26. PARENTAL ADVISORY: this tutorial is cracking oriented!!!
  27.  
  28. Step1: when you run the program for the first time you'll se that all it's ok (except that
  29. annoying nag screen that we'll kill). Close the program and move your system date 30 or more 
  30. days over the installation date. You'll see now that running the program a message box will 
  31. appear with the following written: "The 30-day trial period has expired. Please update to the 
  32. full version".
  33. If you note the caption of this messagebox is "u32Cfg"....mmm what is it? We'll see it later...
  34.  
  35. Step2: open SoftIce pressing Ctrl+D and place a breakpoint on the GetSystemTime function. Close
  36. SoftIce (Ctrl+D again) and run the program.....after few seconds you're in SI again!! You're
  37. now on the first instruction inside the GetSystemTime function: press F11 to return to the piece 
  38. of code that has called this API...you'll land here:
  39.  
  40. :4EB0473C FF15E880B04E            Call dword ptr [4EB080E8]        <- GetSystemTime
  41. :4EB04742 8B4C2400                mov ecx, dword ptr [esp]        <- Move the value 7D0 in ecx
  42. :4EB04746 81E1FFFF0000            and ecx, 0000FFFF            <- Clear ch
  43. :4EB0474C 51                      push ecx                <- Push ecx in the stack
  44. :4EB0474D E84EFFFFFF              call 4EB046A0                <- Elaborates it
  45. :4EB04752 83C404                  add esp, 00000004            <- Tidy up the stack
  46. :4EB04755 85C0                    test eax, eax                <- Test eax (eax=1 in this case)
  47. :4EB04757 7407                    je 4EB04760                <- Jump if eax=0
  48.  
  49. What can we see from this code snippet? This is a check to see if the user has changed the
  50. year of the system date. In fact the program push ecx (7D0h=2000dec the actual year!!) into the
  51. stack and call a function to elaborate it. The result is eax=1 so all has gone well!! Let's
  52. continue with the traceing...You'll see during your trace some calls to API functions that read
  53. from the windows registry (RegQueryValueExA...): don't mind to the "test eax, eax" instruction 
  54. after them because they're only checks to verify that the operation has gone well: continue to 
  55. trace because we're searching for some interessant test!! At a certain point you'll see this:
  56.  
  57. :4EB06B14 8D54243C                lea edx, dword ptr [esp+3C]    <- Moves esp+3c in edx
  58. :4EB06B18 8D442434                lea eax, dword ptr [esp+34]    <- Moves esp+34 in eax (esp+34=1Eh=30dec!!)
  59. :4EB06B1C 52                      push edx                <- Push edx into the stack
  60. :4EB06B1D 50                      push eax                <- Push eax into the stack
  61. :4EB06B1E 686CA8B04E              push 4EB0A86C                <- Push something else
  62. :4EB06B23 E888DFFFFF              call 4EB04AB0                <- Elaborates them
  63. :4EB06B28 83C40C                  add esp, 0000000C            <- Tidy up the stack
  64. :4EB06B2B 85C0                    test eax, eax                <- Test if eax=0 (in this case eax=1)
  65. :4EB06B2D 0F8419010000            je 4EB06C4C                <- Jump if eax=0
  66.  
  67. This code snippet is very interessant because we've seen that here the program push the value 
  68. 1Eh into the stack and elaborates it. The result of the call is eax=1 so we can think that all
  69. has gone well. Come on guys let's continue....another test, the same filosofy!
  70.  
  71. :4EB06D0A 52                      push edx
  72. :4EB06D0B 6808040000              push 00000408
  73. :4EB06D10 E84BCCFFFF              call 4EB03960
  74. :4EB06D15 83C408                  add esp, 00000008
  75. :4EB06D18 85C0                    test eax, eax            <- Eax=1 it's all ok!
  76. :4EB06D1A 7515                    jne 4EB06D31
  77.  
  78. After few instruction from this point you'll arrive here:
  79.  
  80. :4EB06D31 8B442438                mov eax, dword ptr [esp+38]    <- Move esp+38 in eax
  81. :4EB06D35 85C0                    test eax, eax                <- Test eax. In this case eax=0
  82. :4EB06D37 74E7                    je 4EB06D20                <- jump if eax=0
  83.  
  84. In this case something has gone wrong. Let's try to change the je in jne and let's see but 
  85. take a look always to eax because it can be used later for another check from the program. 
  86. Press F10 to continue to trace and the initial nag screen will appear telling you that your
  87. 30-day trial period is expired: something has changed because there's no more the u32Cfg
  88. messagebox! Nopping the call that we've just execute will kill the nag screen.
  89. Ok let's continue on this road....we will not find nothing of interessant until we land in the
  90. Iedit.exe module. The first instruction that we found here is another test eax, eax (in this 
  91. case eax=0)...could it be another check to see if the trial period is over? Try to nop the
  92. following conditional jump and...BOOM! The main window of the program will appear!! Yeah! We
  93. have thought right!! 
  94. What we've seen in this tut is a typical scheme used in commercial protection such like VBox
  95. or Rsagnt32.dll where the main program demand to a dll the routine to check the time limit and
  96. then makes itself another check to increase the possibility of jokeing who try to crak it!
  97.  
  98. I hope this tut could be useful for someone.
  99.  
  100. Bye, UmE!
  101.  
  102. Contact me at: ume15@hotmail.com.
  103.  
  104.  
  105.  
  106.  
  107.